package cn.my.springHDFS.repository;

import cn.my.springHDFS.domain.AdminUser;
import cn.my.springHDFS.domain.User;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

/**
 * Created by Leo on 2017/7/3.
 * 用户Dao
 */
@Repository
public interface UserRepository extends MongoRepository<User, String> {

    //通过账号查询账户
    User findByAccount(String account);

    //通过邮箱查询账户
    User findByEmail(String email);

    //通过账号密码验证用户
    User findByAccountAndPassword(String account, String password);
}
